/**
 *  @auth: sce
 *  @date: 17-12-31
 *  @desc:
 **/

import {connect} from 'react-redux';
import {queryMenuIfNeed} from './../action/menu'
import Menu from './../view/Menu'

const mapStateToProps = ({menuReducer},ownProps) => {
  return {
      ...menuReducer,
      ...ownProps
  }
};

const mapDispatchToProps = dispatch => ({
    queryMenu: () => dispatch(queryMenuIfNeed())
});


const MenuContainer = connect(
    mapStateToProps,
    mapDispatchToProps
)(Menu);

export default MenuContainer;